package com.nc.mem.serial.graph.common;

import static com.nc.mem.serial.graph.Representation.readInt;
import static com.nc.mem.serial.graph.Representation.writeInt;

import java.nio.ByteBuffer;

import com.nc.mem.serial.graph.GraphSerializer;


public final class IntegerSerializer extends GraphSerializer {

	@Override
	public void doRead(final ByteBuffer src, final Object obj) {

	}

	@Override
	public void doWrite(final ByteBuffer dest, final Object obj) {
		writeInt(dest, (Integer) obj);
	}

	@Override
	public Object instantiate(final ByteBuffer src) {
		return readInt(src);
	}

}
